package com.cn.data.jpa.tool.spring.ioc.bean.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class NameService {

    @Autowired
    private IndexService indexService;

//    public NameService(IndexService indexService){
//        this.indexService = indexService;
//        this.indexService.init();
//    }
//

    //    public NameService(){
//        indexService.init();
//    }
//    @PostConstruct
    public void init() {
        System.out.println("name service begin");
//        indexService.init();
    }

    public IndexService getIndexService(){
        return indexService;
    }

}
